$(function () {
    $.get('/listTop', function (data) {
        if (data.code == 0) {
            var tops = data.data;
            for (i in tops) {
                var top = tops[i];
                var html = " <li class='layui-hide-xs layui-this'><a href='/?type=" + top.id + "'>" + top.description + "</a></li>";
                $('.tops').append(html);
            }
        }
    });
})
